package cn.com.yx.ms.domain.sys;

/**
 * MQ队列配置实体
 * Created by zhul on 2017/3/10.
 */
public enum MoveDirectionType {

    UP("上移", 0),
    DOWN("下移", 1),
    ;

    private String name;
    private int index;

    private MoveDirectionType(String name, int index) {
        this.name = name;
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public static MoveDirectionType getEnumFromString(String string) {
        if (string != null) {
            try {
                return Enum.valueOf(MoveDirectionType.class, string.trim());
            } catch (IllegalArgumentException ex) {
            }
        }
        return null;
    }
}
